/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tutorials;

import java.awt.Image;
import javax.swing.Icon;
import javax.swing.ImageIcon;

/**
 *
 * @author timon
 */
public class CustomListItem {
  
  // The image representing this item
    Image image;
    
    // The name of this item
    String name;
    
    public void setImage(Image image) {
      this.image = image;
    }
    
    public Icon getIcon() {
     
      ImageIcon icon = new ImageIcon(image.getScaledInstance(16,16,
              Image.SCALE_FAST));
      return icon;
    }
    
    public void setName(String name) {
      this.name = name;
    }
    
    public String getName() {
      return name;
    }
  
}
